'use strict';
/**
 * development.js during the development we use bower-files to get the list of all the lib(css/js) files
 */
var mainBowerFiles = require('main-bower-files');
var helpers = require('../../../lib/methods');
/**
 * might throw error when the folder is not exsit or empty
 */
var getBowerFiles = function(pattern)
{
    try {
        return mainBowerFiles(pattern);
    } catch (e) {
        return [];
    }
};

module.exports = {
    db: <%- databaseConfigJSON %>,
    assets: {
        lib: {
            // read from the bower dynamicly
            css:  getBowerFiles('**/*.css'),
            js:   helpers.queueJavascripts(getBowerFiles('**/*.js') , ['jquery.js']) // quick fix for the ordering
        },
        // this should be standard procedure. Don't change
        css: [
            'app/client/web/styles/**/*.css'
        ],
        js: [
            'app/client/web/scripts/**/*.js'
        ],
        tests: [
            'public/lib/angular-mocks/angular-mocks.js',
            'public/modules/*/tests/*.js'
        ]
    }
};
